\(\int x^2 (d+e x^2) (a+b \arctan (c x)) \, dx\) [1115]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 19, antiderivative size = 94 \[ \int x^2 \left (d+e x^2\right ) (a+b \arctan (c x)) \, dx=-\frac {b \left (5 c^2 d-3 e\right ) x^2}{30 c^3}-\frac {b e x^4}{20 c}+\frac {1}{3} d x^3 (a+b \arctan (c x))+\frac {1}{5} e x^5 (a+b \arctan (c x))+\frac {b \left (5 c^2 d-3 e\right ) \log \left (1+c^2 x^2\right )}{30 c^5} \]

[Out]

-1/30*b*(5*c^2*d-3*e)*x^2/c^3-1/20*b*e*x^4/c+1/3*d*x^3*(a+b*arctan(c*x))+1/5*e*x^5*(a+b*arctan(c*x))+1/30*b*(5
*c^2*d-3*e)*ln(c^2*x^2+1)/c^5

Rubi [A] (verified)

Time = 0.08 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.211, Rules used = {14, 5096, 457, 78} \[ \int x^2 \left (d+e x^2\right ) (a+b \arctan (c x)) \, dx=\frac {1}{3} d x^3 (a+b \arctan (c x))+\frac {1}{5} e x^5 (a+b \arctan (c x))+\frac {b \left (5 c^2 d-3 e\right ) \log \left (c^2 x^2+1\right )}{30 c^5}-\frac {b x^2 \left (5 c^2 d-3 e\right )}{30 c^3}-\frac {b e x^4}{20 c} \]

[In]

Int[x^2*(d + e*x^2)*(a + b*ArcTan[c*x]),x]

[Out]

-1/30*(b*(5*c^2*d - 3*e)*x^2)/c^3 - (b*e*x^4)/(20*c) + (d*x^3*(a + b*ArcTan[c*x]))/3 + (e*x^5*(a + b*ArcTan[c*
x]))/5 + (b*(5*c^2*d - 3*e)*Log[1 + c^2*x^2])/(30*c^5)

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 78

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rule 457

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Dist[1/n, Subst[Int
[x^(Simplify[(m + 1)/n] - 1)*(a + b*x)^p*(c + d*x)^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p, q}, x] &&
 NeQ[b*c - a*d, 0] && IntegerQ[Simplify[(m + 1)/n]]

Rule 5096

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))*((f_.)*(x_))^(m_.)*((d_.) + (e_.)*(x_)^2)^(q_.), x_Symbol] :> With[{u =
 IntHide[(f*x)^m*(d + e*x^2)^q, x]}, Dist[a + b*ArcTan[c*x], u, x] - Dist[b*c, Int[SimplifyIntegrand[u/(1 + c^
2*x^2), x], x], x]] /; FreeQ[{a, b, c, d, e, f, m, q}, x] && ((IGtQ[q, 0] &&  !(ILtQ[(m - 1)/2, 0] && GtQ[m +
2*q + 3, 0])) || (IGtQ[(m + 1)/2, 0] &&  !(ILtQ[q, 0] && GtQ[m + 2*q + 3, 0])) || (ILtQ[(m + 2*q + 1)/2, 0] &&
  !ILtQ[(m - 1)/2, 0]))

Rubi steps \begin{align*} \text {integral}& = \frac {1}{3} d x^3 (a+b \arctan (c x))+\frac {1}{5} e x^5 (a+b \arctan (c x))-(b c) \int \frac {x^3 \left (5 d+3 e x^2\right )}{15+15 c^2 x^2} \, dx \\ & = \frac {1}{3} d x^3 (a+b \arctan (c x))+\frac {1}{5} e x^5 (a+b \arctan (c x))-\frac {1}{2} (b c) \text {Subst}\left (\int \frac {x (5 d+3 e x)}{15+15 c^2 x} \, dx,x,x^2\right ) \\ & = \frac {1}{3} d x^3 (a+b \arctan (c x))+\frac {1}{5} e x^5 (a+b \arctan (c x))-\frac {1}{2} (b c) \text {Subst}\left (\int \left (\frac {5 c^2 d-3 e}{15 c^4}+\frac {e x}{5 c^2}+\frac {-5 c^2 d+3 e}{15 c^4 \left (1+c^2 x\right )}\right ) \, dx,x,x^2\right ) \\ & = -\frac {b \left (5 c^2 d-3 e\right ) x^2}{30 c^3}-\frac {b e x^4}{20 c}+\frac {1}{3} d x^3 (a+b \arctan (c x))+\frac {1}{5} e x^5 (a+b \arctan (c x))+\frac {b \left (5 c^2 d-3 e\right ) \log \left (1+c^2 x^2\right )}{30 c^5} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 119, normalized size of antiderivative = 1.27 \[ \int x^2 \left (d+e x^2\right ) (a+b \arctan (c x)) \, dx=-\frac {b d x^2}{6 c}+\frac {b e x^2}{10 c^3}+\frac {1}{3} a d x^3-\frac {b e x^4}{20 c}+\frac {1}{5} a e x^5+\frac {1}{3} b d x^3 \arctan (c x)+\frac {1}{5} b e x^5 \arctan (c x)+\frac {b d \log \left (1+c^2 x^2\right )}{6 c^3}-\frac {b e \log \left (1+c^2 x^2\right )}{10 c^5} \]

[In]

Integrate[x^2*(d + e*x^2)*(a + b*ArcTan[c*x]),x]

[Out]

-1/6*(b*d*x^2)/c + (b*e*x^2)/(10*c^3) + (a*d*x^3)/3 - (b*e*x^4)/(20*c) + (a*e*x^5)/5 + (b*d*x^3*ArcTan[c*x])/3
 + (b*e*x^5*ArcTan[c*x])/5 + (b*d*Log[1 + c^2*x^2])/(6*c^3) - (b*e*Log[1 + c^2*x^2])/(10*c^5)

Maple [A] (verified)

Time = 0.18 (sec) , antiderivative size = 104, normalized size of antiderivative = 1.11

method result size
parts \(a \left (\frac {1}{5} e \,x^{5}+\frac {1}{3} d \,x^{3}\right )+\frac {b \left (\frac {c^{3} \arctan \left (c x \right ) e \,x^{5}}{5}+\frac {\arctan \left (c x \right ) d \,c^{3} x^{3}}{3}-\frac {\frac {5 d \,c^{4} x^{2}}{2}+\frac {3 e \,c^{4} x^{4}}{4}-\frac {3 e \,c^{2} x^{2}}{2}+\frac {\left (-5 c^{2} d +3 e \right ) \ln \left (c^{2} x^{2}+1\right )}{2}}{15 c^{2}}\right )}{c^{3}}\) \(104\)
derivativedivides \(\frac {\frac {a \left (\frac {1}{3} d \,c^{5} x^{3}+\frac {1}{5} e \,c^{5} x^{5}\right )}{c^{2}}+\frac {b \left (\frac {\arctan \left (c x \right ) d \,c^{5} x^{3}}{3}+\frac {\arctan \left (c x \right ) e \,c^{5} x^{5}}{5}-\frac {d \,c^{4} x^{2}}{6}-\frac {e \,c^{4} x^{4}}{20}+\frac {e \,c^{2} x^{2}}{10}-\frac {\left (-5 c^{2} d +3 e \right ) \ln \left (c^{2} x^{2}+1\right )}{30}\right )}{c^{2}}}{c^{3}}\) \(111\)
default \(\frac {\frac {a \left (\frac {1}{3} d \,c^{5} x^{3}+\frac {1}{5} e \,c^{5} x^{5}\right )}{c^{2}}+\frac {b \left (\frac {\arctan \left (c x \right ) d \,c^{5} x^{3}}{3}+\frac {\arctan \left (c x \right ) e \,c^{5} x^{5}}{5}-\frac {d \,c^{4} x^{2}}{6}-\frac {e \,c^{4} x^{4}}{20}+\frac {e \,c^{2} x^{2}}{10}-\frac {\left (-5 c^{2} d +3 e \right ) \ln \left (c^{2} x^{2}+1\right )}{30}\right )}{c^{2}}}{c^{3}}\) \(111\)
parallelrisch \(\frac {12 x^{5} \arctan \left (c x \right ) b \,c^{5} e +12 a \,c^{5} e \,x^{5}+20 d b \arctan \left (c x \right ) x^{3} c^{5}-3 b \,c^{4} e \,x^{4}+20 a \,c^{5} d \,x^{3}-10 b \,c^{4} d \,x^{2}+6 b \,c^{2} e \,x^{2}+10 \ln \left (c^{2} x^{2}+1\right ) b \,c^{2} d +10 b \,c^{2} d -6 \ln \left (c^{2} x^{2}+1\right ) b e -6 e b}{60 c^{5}}\) \(127\)
risch \(-\frac {i b \left (3 e \,x^{5}+5 d \,x^{3}\right ) \ln \left (i c x +1\right )}{30}+\frac {i b e \,x^{5} \ln \left (-i c x +1\right )}{10}+\frac {i b d \,x^{3} \ln \left (-i c x +1\right )}{6}+\frac {a e \,x^{5}}{5}+\frac {x^{3} d a}{3}-\frac {b e \,x^{4}}{20 c}-\frac {b d \,x^{2}}{6 c}+\frac {b e \,x^{2}}{10 c^{3}}+\frac {\ln \left (-c^{2} x^{2}-1\right ) b d}{6 c^{3}}-\frac {\ln \left (-c^{2} x^{2}-1\right ) b e}{10 c^{5}}\) \(139\)

[In]

int(x^2*(e*x^2+d)*(a+b*arctan(c*x)),x,method=_RETURNVERBOSE)

[Out]

a*(1/5*e*x^5+1/3*d*x^3)+b/c^3*(1/5*c^3*arctan(c*x)*e*x^5+1/3*arctan(c*x)*d*c^3*x^3-1/15/c^2*(5/2*d*c^4*x^2+3/4
*e*c^4*x^4-3/2*e*c^2*x^2+1/2*(-5*c^2*d+3*e)*ln(c^2*x^2+1)))

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 107, normalized size of antiderivative = 1.14 \[ \int x^2 \left (d+e x^2\right ) (a+b \arctan (c x)) \, dx=\frac {12 \, a c^{5} e x^{5} + 20 \, a c^{5} d x^{3} - 3 \, b c^{4} e x^{4} - 2 \, {\left (5 \, b c^{4} d - 3 \, b c^{2} e\right )} x^{2} + 4 \, {\left (3 \, b c^{5} e x^{5} + 5 \, b c^{5} d x^{3}\right )} \arctan \left (c x\right ) + 2 \, {\left (5 \, b c^{2} d - 3 \, b e\right )} \log \left (c^{2} x^{2} + 1\right )}{60 \, c^{5}} \]

[In]

integrate(x^2*(e*x^2+d)*(a+b*arctan(c*x)),x, algorithm="fricas")

[Out]

1/60*(12*a*c^5*e*x^5 + 20*a*c^5*d*x^3 - 3*b*c^4*e*x^4 - 2*(5*b*c^4*d - 3*b*c^2*e)*x^2 + 4*(3*b*c^5*e*x^5 + 5*b
*c^5*d*x^3)*arctan(c*x) + 2*(5*b*c^2*d - 3*b*e)*log(c^2*x^2 + 1))/c^5

Sympy [A] (verification not implemented)

Time = 0.37 (sec) , antiderivative size = 128, normalized size of antiderivative = 1.36 \[ \int x^2 \left (d+e x^2\right ) (a+b \arctan (c x)) \, dx=\begin {cases} \frac {a d x^{3}}{3} + \frac {a e x^{5}}{5} + \frac {b d x^{3} \operatorname {atan}{\left (c x \right )}}{3} + \frac {b e x^{5} \operatorname {atan}{\left (c x \right )}}{5} - \frac {b d x^{2}}{6 c} - \frac {b e x^{4}}{20 c} + \frac {b d \log {\left (x^{2} + \frac {1}{c^{2}} \right )}}{6 c^{3}} + \frac {b e x^{2}}{10 c^{3}} - \frac {b e \log {\left (x^{2} + \frac {1}{c^{2}} \right )}}{10 c^{5}} & \text {for}\: c \neq 0 \\a \left (\frac {d x^{3}}{3} + \frac {e x^{5}}{5}\right ) & \text {otherwise} \end {cases} \]

[In]

integrate(x**2*(e*x**2+d)*(a+b*atan(c*x)),x)

[Out]

Piecewise((a*d*x**3/3 + a*e*x**5/5 + b*d*x**3*atan(c*x)/3 + b*e*x**5*atan(c*x)/5 - b*d*x**2/(6*c) - b*e*x**4/(
20*c) + b*d*log(x**2 + c**(-2))/(6*c**3) + b*e*x**2/(10*c**3) - b*e*log(x**2 + c**(-2))/(10*c**5), Ne(c, 0)),
(a*(d*x**3/3 + e*x**5/5), True))

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 105, normalized size of antiderivative = 1.12 \[ \int x^2 \left (d+e x^2\right ) (a+b \arctan (c x)) \, dx=\frac {1}{5} \, a e x^{5} + \frac {1}{3} \, a d x^{3} + \frac {1}{6} \, {\left (2 \, x^{3} \arctan \left (c x\right ) - c {\left (\frac {x^{2}}{c^{2}} - \frac {\log \left (c^{2} x^{2} + 1\right )}{c^{4}}\right )}\right )} b d + \frac {1}{20} \, {\left (4 \, x^{5} \arctan \left (c x\right ) - c {\left (\frac {c^{2} x^{4} - 2 \, x^{2}}{c^{4}} + \frac {2 \, \log \left (c^{2} x^{2} + 1\right )}{c^{6}}\right )}\right )} b e \]

[In]

integrate(x^2*(e*x^2+d)*(a+b*arctan(c*x)),x, algorithm="maxima")

[Out]

1/5*a*e*x^5 + 1/3*a*d*x^3 + 1/6*(2*x^3*arctan(c*x) - c*(x^2/c^2 - log(c^2*x^2 + 1)/c^4))*b*d + 1/20*(4*x^5*arc
tan(c*x) - c*((c^2*x^4 - 2*x^2)/c^4 + 2*log(c^2*x^2 + 1)/c^6))*b*e

Giac [F]

\[ \int x^2 \left (d+e x^2\right ) (a+b \arctan (c x)) \, dx=\int { {\left (e x^{2} + d\right )} {\left (b \arctan \left (c x\right ) + a\right )} x^{2} \,d x } \]

[In]

integrate(x^2*(e*x^2+d)*(a+b*arctan(c*x)),x, algorithm="giac")

[Out]

sage0*x

Mupad [B] (verification not implemented)

Time = 0.70 (sec) , antiderivative size = 101, normalized size of antiderivative = 1.07 \[ \int x^2 \left (d+e x^2\right ) (a+b \arctan (c x)) \, dx=\frac {a\,d\,x^3}{3}+\frac {a\,e\,x^5}{5}+\frac {b\,d\,x^3\,\mathrm {atan}\left (c\,x\right )}{3}+\frac {b\,e\,x^5\,\mathrm {atan}\left (c\,x\right )}{5}+\frac {b\,d\,\ln \left (c^2\,x^2+1\right )}{6\,c^3}-\frac {b\,e\,\ln \left (c^2\,x^2+1\right )}{10\,c^5}-\frac {b\,d\,x^2}{6\,c}-\frac {b\,e\,x^4}{20\,c}+\frac {b\,e\,x^2}{10\,c^3} \]

[In]

int(x^2*(a + b*atan(c*x))*(d + e*x^2),x)

[Out]

(a*d*x^3)/3 + (a*e*x^5)/5 + (b*d*x^3*atan(c*x))/3 + (b*e*x^5*atan(c*x))/5 + (b*d*log(c^2*x^2 + 1))/(6*c^3) - (
b*e*log(c^2*x^2 + 1))/(10*c^5) - (b*d*x^2)/(6*c) - (b*e*x^4)/(20*c) + (b*e*x^2)/(10*c^3)